import random

import dd1

def chosen_one():
    flag = True
    while flag:
        start = input('摁下回车键开始抽奖！摁下其他键终止游戏!')
        if start == '':
            lst = []
            for x in dd1.RECORDS:
                lst.append(x.get('studentNo'))
            choosing_number = random.randint(min(tuple(lst)), max(tuple(lst)))
            print(f'恭喜 "{dd1.RECORDS[choosing_number - 1].get("name")}" 同学成为天选的...答题人')
        else:
            flag = False
            print('游戏已结束！')


chosen_one()
